package com.janj.controller;

import com.janj.bean.Student;
import com.janj.service.StudentService;
import com.janj.service.StudentServiceimpl;
import org.junit.Test;

import java.util.HashMap;
import java.util.List;

//测试类
public class StudentDemo {
    @Test
    public void  testSelectAll(){
        //创建对象
        StudentService service = new StudentServiceimpl();
        List<Student> array = service.selectAll();
        System.out.println("------------");
        for (Student stu : array) {
            System.out.println(stu);
        }
    }

    @Test
    public void testSelectMoreFactorDiffer(){
        //创建对象
        StudentService service = new StudentServiceimpl();

        HashMap<String,String> map = new HashMap<>();
        map.put("name","多多");
        map.put("age","20");

        List<Student> array = service.selectMoreFactorDiffer(map);
        System.out.println("-------");
        for (Student stu : array) {
            System.out.println(stu);
        }
    }

}
